Imports Microsoft.VisualBasic
Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms

Namespace Phoenix.Tools.Backup
	Public Class SelectPage : Inherits Phoenix.Tools.WizardPageBase
		Private lblTodo As System.Windows.Forms.Label
		Private btnBackup As System.Windows.Forms.RadioButton
		Private btnRestore As System.Windows.Forms.RadioButton
		Private components As System.ComponentModel.IContainer = Nothing

		Public Sub New()
			' This call is required by the Windows Form Designer.
			InitializeComponent()

			' TODO: Add any initialization after the InitializeComponent call
		End Sub

		''' <summary>
		''' Clean up any resources being used.
		''' </summary>
		Protected Overrides Overloads Sub Dispose(ByVal disposing As Boolean)
			If disposing Then
				If Not components Is Nothing Then
					components.Dispose()
				End If
			End If
			MyBase.Dispose(disposing)
		End Sub

		#Region "Designer generated code"
		''' <summary>
		''' Required method for Designer support - do not modify
		''' the contents of this method with the code editor.
		''' </summary>
		Private Sub InitializeComponent()
			Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(SelectPage))
			Me.lblTodo = New System.Windows.Forms.Label()
			Me.btnBackup = New System.Windows.Forms.RadioButton()
			Me.btnRestore = New System.Windows.Forms.RadioButton()
			Me.SuspendLayout()
			' 
			' lblTodo
			' 
			Me.lblTodo.Location = New System.Drawing.Point(24, 8)
			Me.lblTodo.Name = "lblTodo"
			Me.lblTodo.Size = New System.Drawing.Size(176, 23)
			Me.lblTodo.TabIndex = 0
			Me.lblTodo.Text = "What do you want to do?"
			' 
			' btnBackup
			' 
			Me.btnBackup.Checked = True
			Me.btnBackup.FlatStyle = System.Windows.Forms.FlatStyle.System
			Me.btnBackup.Location = New System.Drawing.Point(40, 64)
			Me.btnBackup.Name = "btnBackup"
			Me.btnBackup.Size = New System.Drawing.Size(280, 24)
			Me.btnBackup.TabIndex = 1
			Me.btnBackup.TabStop = True
			Me.btnBackup.Text = "B&ack up Phoenix database and configuration files"
			' 
			' btnRestore
			' 
			Me.btnRestore.FlatStyle = System.Windows.Forms.FlatStyle.System
			Me.btnRestore.Location = New System.Drawing.Point(40, 96)
			Me.btnRestore.Name = "btnRestore"
			Me.btnRestore.Size = New System.Drawing.Size(280, 24)
			Me.btnRestore.TabIndex = 2
			Me.btnRestore.Text = "&Restore an Phoenix database and configuration files"
			' 
			' SelectPage
			' 
			Me.Controls.Add(Me.btnRestore)
			Me.Controls.Add(Me.btnBackup)
			Me.Controls.Add(Me.lblTodo)
			Me.Description = " You can back up a database, or restore it from a previous backup."
			Me.HeaderImage = (CType(resources.GetObject("$this.HeaderImage"), System.Drawing.Image))
			Me.Name = "SelectPage"
			Me.Size = New System.Drawing.Size(924, 761)
			Me.Title = "Backup or Restore"
'			Me.Next += New Phoenix.Tools.WizardForm.WizardNextEventHandler(Me.SelectPage_Next);
			Me.ResumeLayout(False)

		End Sub
		#End Region

		Public Manager As OperationManager

        Private Sub SelectPage_Next(ByVal sender As Object, ByVal e As Phoenix.Tools.WizardForm.EventNextArgs) Handles MyBase.NextEvent
            Manager.BackupMode = btnBackup.Checked
        End Sub

        Protected Friend Overrides Sub OnPageShown()
            WizardPageParent.WizardButtons = WizardForm.TWizardsButtons.AllShort
        End Sub
    End Class
End Namespace

